package com.du.controller;

import com.du.domain.Student;
import com.du.service.StudentService;
import com.du.vo.ResultInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class StudentController {
    @Autowired
    private StudentService studentService;

    /**
     * 查询全部
     * @return
     */
    @GetMapping("/student")
    public ResultInfo findAllStudent(){
        List<Student> list = studentService.findAll();
        return ResultInfo.success(list);
    }


}
